{include file="public/header" /}
<style type="text/css">
	.aui-radio{width: 0.8rem;height: 0.8rem;vertical-align: middle;}
	.aui-list label{font-size: 0.5rem;display: -webkit-inline-box;display: table-cell;padding-right: 10px;}
	.aui-list .aui-list-item:after{height: 1px !important;}
</style>

<div class="aui-content wrap Personal" style="padding: 10px 0.75rem;">
    <div class="innercontent11">
        <form name="formPassword" action="{:url('UserSetting/change_password')}" method="post" class="ajax-form change_password" onSubmit="change_password();">
			<ul class="aui-list aui-form-list">
        		<li class="aui-list-header">{eq name="user.is_set_password" value="1"}修改密码{else/}密码设置{/eq}</li>
        		{eq name="user.is_set_password" value="1"}
				<li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    旧密码
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="password" name="old_password" placeholder="原密码">
		                </div>
		            </div>
		        </li>
		        {/eq}
		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    新密码
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="password" name="new_password" placeholder="新密码" >
		                </div>
		            </div>
		        </li>
		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    确认密码
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="password" name="repassword" placeholder="确认密码">
		                </div>
		            </div>
		        </li>
        	</ul>
            <div class="field submit-btn" style="padding: 0 10px;margin-top: 50px;">
                <button type="submit" class="aui-btn aui-btn-block aui-btn-sm aui-btn-danger">确认修改</button>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
function change_password(){
	$('input[type="password"]').each(function () {
		if(!$(this).hasClass('not-md5') && $(this).val()){
			var password     = $(this).val();
			var password_md5 = $.md5(password);
			$(this).val(password_md5);
		}
	});
}
</script>
{include file="public/footer" /}